#-*coding:UTF-8 -*-
'''
Created on 2013-5-31

@author: Administrator
'''
#检查标识符是否合法
import string

alphas = string.ascii_letters + '_'
nums = string.digits

print 'Welcome to Identifier Checker v1.0'
print 'Testees must be at least 2 chars long.'

myInput = raw_input("Identifier to test?")

if len(myInput) > 1:
    if myInput[0] not in alphas:
        print ''' invalid: fisrt symbol must be alphabetic''' 
    else:
        for otherChars in myInput[1:]:
            if otherChars not in alphas + nums:
                print ''' symbol must be alphanumeric'''
                break
            else:
                print 'okay as an indetifier'

